
#ifndef CONSTANTES_H
#define CONSTANTES_H

#include<iostream>

typedef unsigned short int numero;
typedef std::string cadena;


/* SDL */
#define GAME_COLOR_DEPTH 24
#define GAME_MENU_WIDTH 400
#define GAME_MENU_HEIGHT 330

#define DPI 42
#define BITS_PER_PIXEL 32
#define FRAMES_PER_SECOND 20

#define GAME_NAME "SpaceMaster"
#define GAME_TITLE "SpaceMaster : "
#define STRING_EMPTY ""

/*Window*/

//valores por defecto de una objeto
#define NOMBRE_DEFAULT_OBJETO "nombre_default_objeto"
#define POSX_DEFAULT_OBJETO 0
#define POSY_DEFAULT_OBJETO 0
#define ACCION_DEFAULT_OBJETO "accion_default_objeto"


//valor por defecto de un escenario
#define NOMBRE_DEFAULT_ESCENARIO "nombre_default_escenario"

#define XML_PATH "./resources/archivosXML/"
#define XML_SHIPS_PATH "./resources/archivosXML/ships/ships.xml"
#define LOG_PATH "log.txt"

#define LABEL_IMG_PATH "./resources/img/fondomensaje.png"



/* TextScrollBar */
#define SCROLLTXTPANELH 220
#define CANT_MAX_TEXT_ELEMENTS 11
#define PRIMERO 1
#define INTERMEDIO 2
#define ULTIMO 3

#define BUTTON_FONT_PATH "./resources/font/Neuton.ttf"


#define EDIT_WIDTH_RESOLUTION 1024
#define EDIT_HEIGHT_RESOLUTION 700

#define LOAD_WIDTH_RESOLUTION 570
#define LOAD_HEIGHT_RESOLUTION 550

#define SOCKET_ERROR -1
#define SOCKET_EXITO 1

#define PLANO_MAX_LONG sizeof(long int)

enum WindowID {load, play,connection,PRINCIPAL,CONNECT,CREATE, EXIT,UserKeyPressed,UserKeyReleased,TABCLIENT,TABSERVER,SERVER_CREATED, CLIENT_CREATED, SERVER_ERROR, CLIENT_ERROR,CLIENT_EXISTENTE,CLIENT_ALREADY_CONNECTED, CLIENT_CONNECTING, CONNECTION_ERROR};

#define TEMP_DIR "./tmp/"

#define SERVER_OWN "SERVER"
#define MAX_SERVER_LISTEN 2



//Default values for the TipoAsteroide
#define TA_DEFAULT_NAME		"DEFAULT"
#define TA_DEFAULT_IMAGE	"./resources/img/objetos/Asteroide1a.png"
#define TA_DEFAULT_WIDTH	100
#define TA_DEFAULT_HEIGTH	100
#define TA_DEFAULT_ROTATION 10
#define TA_MIN_ROTATION 0
#define TA_MAX_ROTATION 359

#define BASE_DEFAULT_WIDTH 100


//Default values for the Asteroide
#define AS_DEFAULT_IMAGE	"./resources/img/objetos/asteroide1a.png"
#define AS_DEFAULT_TIPO		"DEFAULT"
#define AS_DEFAULT_X		50
#define AS_DEFAULT_Y		100
#define AS_DEFAULT_DIREC	50
#define AS_DEFAULT_VEL		130

#define AS_NIVEL_INICIAL	1

#define EXPLOSION_VELOCITY 40
#define EXPLOSION_HEIGHT 40
#define EXPLOSION_WIDTH 40
#define EXPLOSION_DURATION 1
#define EXPLOTION_IMAGE		"./resources/img/objetos/explosion.png"


//Default values for the Ship
#define SHIP_DEFAULT_LIFE 100
#define SH_DEFAULT_X		0
#define SH_DEFAULT_Y		0
#define SH_DEFAULT_DIREC	0
#define SH_DEFAULT_VELMAX	100
#define SH_DEFAULT_VELROT	1
#define SH_DEFAULT_PROPULSION	10
#define SH_DEFAULT_FRICCION	0
#define SH_DEFAULT_DURBALA	50
#define SH_DEFAULT_IMAGE	"./resources/img/objetos/ship1.png"
#define SH_DEFAULT_IMAGE_COMBUSTION "./resources/img/objetos/ship1_fuego.png"
#define SH_DEFAULT_ANGLE	90
#define SH_DEFAULT_HEIGHT	40
#define SH_DEFAULT_WIDHT	40

#define NEUTON_FONT "./resources/font/Neuton.ttf"
#define DEFAULT_FONT NEUTON_FONT
#define DEFAULT_FONT_SIZE 18
#define TEXTBOX_DEFAULT_TEXT "Ingrese Dato.."

#define IMAGES_DEFAULT_FOLDER "./resources/img/"
#define IMAGES_DEFAULT_PRESSED "_pressed.png"
#define IMAGES_DEFAULT_UNPRESSED "_default.png"


#define SCENARIOS "scenarios"
#define SCENARIO "scenario"
#define SCENARIOS_FILE "scenarios.xml"
#define SHIPS "naves"
#define XML_SHIP "nave"
#define SHIPS_FILE "ships.xml"
#define XML_NAME "name"
#define XML_FILE "file"

//Paths for tabs
#define TAB_IMAGES_DEFAULT_FOLDER	"./resources/img/tabs/"

// Status
#define STATUS_HEIGHT 20

// Paths for bases
#define BASE_IMAGE_PLAYER1 "./resources/img/objetos/base1.png"
#define BASE_IMAGE_PLAYER2 "./resources/img/objetos/base2.png"

#define LIVES_DEFAULT_IMAGE "./resources/img/objetos/vida.png"

// Music default path
#define MUSIC_DEFAULT_PATH "./resources/Sounds/ambient_music.wav"

enum playElement{AMMO,ASTEROID,BONUS, SHIP, EXPLOSION , SHIP_BASE , NONE};

//OFFSETS FOR AMMO
#define BULLET_OFFSET 4
#define MISSILE_OFFSET 30
#define LASER_OFFSET 40
#define MINA_OFFSET 40

#endif
